package com.brillilab.service.core.lab;

import com.brillilab.domain.enums.lab.LabMemberPowerEnum.Power;
import com.brillilab.domain.pa.lab.PowerModifyPa;
import com.brillilab.domain.po.lab.LabMemberPower;
import com.brillilab.domain.vo.user.UserInfoVo;

import java.util.List;

/**
 * 实验室成员权限Service
 * @author lj
 *
 */
public interface ILabMemberPowerService {

	/**
	 * 获取实验室成员权限列表
	 * @param labId
	 * @param labMemberId
	 * @return
	 */
	List<LabMemberPower> selectList(Long labId, Long labMemberId);

	boolean modifyPower(Long labId, Long labMemberId, String[] powers);

	boolean deleteAll(Long labId, Long labMemberId);

	boolean delete(Long labId, Long labMemberId, String power);

	boolean delete(Long id);

	LabMemberPower add(LabMemberPower entity);

    boolean modifyOne(Long labId,Long labMemberId,String power,Integer isOpen);

	boolean isOwner(Long labId,Long labMemberId);
	/**
	 * 批量修改权限
	 * @param userInfo 登录用户信息
	 * @param reqList 修改实验室成员列表
	 * @return
	 */
	boolean batchModifyPower(UserInfoVo userInfo, List<PowerModifyPa> reqList);
	/**
	 * 批量用户删除权限
	 * @param power
	 * @param labId
	 * @param labMemberIds
	 * @return
	 */
	boolean deleteBatch(String power, Long labId, List<Long> labMemberIds);
	/**
	 * 批量用户添加权限
	 * @param power
	 * @param labId
	 * @param labMemberIds
	 * @return
	 */
	boolean addBatch(String power, Long labId, List<Long> labMemberIds);
	/**
	 * 判断实验室成员是否具有该权限
	 * @param labMemberId
	 * @param userManage
	 * @return
	 */
	boolean isPower(Long labId,Long labMemberId, Power power);

    List<LabMemberPower> selectListByLabIdInLabMemberIds(Long labId,List<Long> labMemberIds);

	List<LabMemberPower> selectListByLabIdAndLabMemberId(Long labId,Long labMemberId);
}
